home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0643C.ZIP
/
TWENTY.DOC
< prev
next >
Wrap
Text File
|
1987-02-01
|
2KB
|
44 lines
TITLE Twenty Files - A dBASE III Plus Callable Module
; by James Troutman (JT)
; Version 1.00
COMMENT *
This is the assembly language source code for a module that can be
LOADed and CALLed in dBASE III Plus. It requires DOS 3.xx or greater.
When assembled (with MASM) it should be LINKed and converted to a binary
(.BIN) file with EXE2BIN. It uses what is currently an undocumented
feature of DOS -- namely the ability to move the file handle table and
increase its length to allow more than the default 20 open files.
However, since dBASE itself imposes a limit of 20 files, it does not
make sense to increase the handle table to more than 25 entries. This
allows DOS to have its 5 (STDIN, STDOUT, STDERR, STDAUX, and STDPRN) and
still leave room for 20 active files in dBASE.
[Actually, the dBASE programmers were clever enough to close the STDAUX
device (no one uses it, anyway) and use its freed handle for the dBASE
overlay file.]
A problem with an earlier test version of this module has been fixed.
It no longer makes any difference how many times the module is LOADed or
CALLed -- the expanded handle table is no longer stored within the
module's memory, but in an unused (I hope!) area of dBASE's Program
Segment Prefix. Although I have tested this, PLEASE use it
with caution, and please let me know of any problems (or successes!)
that you have with it.
SYNTAX:
LOAD Twenty
CALL Twenty
... and get ready to open your 20 files!
Good Luck!
James Troutman (JT)
CompuServe PPN 74746,1567
P.S. See the May, 1986 issue of Dr. Dobbs Journal, pp 107-108 for more
information about how and why this program works. If I get ambitious, I
will upload a version with a .DOC file that will explain some of the
theory of why it works.